<template>
  <section class="my-index clearfix">
    <div class="left-box">
      <left-menu :menu="list"></left-menu>
    </div>
    <div class="center-box">
      <router-view></router-view>
    </div>
    <div class="right-box">
      <div class="guan" v-if="path()!==true">
         <span>1年</span>
        <p>积分：<b>200000</b></p>
        <p>您是红粉宝宝平台皇冠级用户<span>【详情】</span></p>
      </div>
      <side-user style="margin-bottom: 10px" :type="1" v-if="path()!==true"></side-user>

      <div class="jifen"  v-if="path()===true">
       <div class="jifen-top">
        <p>我的积分：<span>8268</span></p>
       </div>
        <div class="jifen-button">
          <p>做任务，赚积分</p>
        </div>
      </div>
      <div class="renwu clearfix" v-if="path()===true">
       <p>完成以下任务可获得相应积分</p>
        <ul class="clearfix">
          <li><span>1、完善资料</span><img src="../../../assets/coin.png" alt="img"><span>积分：<b>+50</b></span></li>
          <li><span>1、完善资料</span><img src="../../../assets/coin.png" alt="img"><span>积分：<b>+50</b></span></li>
          <li><span>1、完善资料</span><img src="../../../assets/coin.png" alt="img"><span>积分：<b>+50</b></span></li>
          <li><span>1、完善资料</span><img src="../../../assets/coin.png" alt="img"><span>积分：<b>+50</b></span></li>
        </ul>
        <span>更多任务>></span>
      </div>
      <my-side></my-side>
    </div>
  </section>
</template>

<script>
import LeftMenu from "../../../components/My/LeftMenu/"
import SideUser from "@/components/My/UserInfo/SideUserinfo"
import MySide from "../../../components/SideMenu/MySide"
export default {
  name: 'MyIndex',
  components: {
      LeftMenu,
      SideUser,
      MySide
  },
   data () {
      return {
          list: [
              {
                id:1,
                name: '更多设置',
                child: [
                    {id: 11,name: '系统通知', path: '/my/myindex/systeminfo',
                     child:[
                         {id: 11,name: '系统通知', path: '/my/myindex/'},
                         {id: 11,name: '系统通知', path: '/my/myindex/'},
                     ]
                    },
                    {id: 12,name: '我的积分', path: '/my/myindex/pointlist',
                        child:[
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                        ]
                    },
                    {id: 13,name: '私信', path: '/my/myindex/personalmsg',
                        child:[
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                        ]
                    },
                    {id: 14,name: '我的优惠券', path: '/my/myindex/mycoupon',
                        child:[
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                        ]
                    },
                    {id: 16,name: '我的钱包', path: '/my/myindex/mywallet',
                        child:[
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                            {id: 11,name: '系统通知', path: '/my/myindex/'},
                        ]
                    }
                ]
              },
              {
                  id:2,
                  name: '交易管理',
                  child: [
                      {id: 31,name: '账户管理', path: '/my/myindex/mywallet',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 32,name: '订单管理', path: '/my/myindex/myorder',
                      child:[
                                {id: 11,name: '系统通知', path: '/my/myindex/orderdelist'},
                                {id: 11,name: '系统通知', path: '/my/myindex/logistics'},
                             ]
                         },
                      {id: 33,name: '售后/退款', path: '/my/myindex/aftersale',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/groundsrefundsdelist'},
                              {id: 12,name: '退款', path: '/my/myindex/groundsrefunds'},
                          ]
                      },
                      {id: 34,name: '评价管理', path: '/my/myindex/management',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/managedelists'},
                              {id: 12,name: '立即评价', path: '/my/myindex/immediate'},
                          ]
                      },
                      {id: 35,name: '收藏管理', path: '/my/myindex/collection',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 36,name: '我的足迹', path: '/my/myindex/footprint',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 37,name: '购物车', path: '/my/myindex/shoppingcart',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                  ]
              },
              {
                  id:3,
                  name: '综合管理',
                  child: [
                      {id: 31,name: '积分管理', path: '/my/myindex/pointlist',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 32,name: '等级管理', path: '/my/myindex/level',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 33,name: '我的优惠券', path: '/my/myindex/mycoupon',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 34,name: '任务管理', path: '/my/myindex/',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 35,name: '问答管理', path: '/my/myindex/question',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 36,name: '反馈中心', path: '/my/myindex/feedbackcenter',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 37,name: '服务中心', path: '/my/myindex/servicecentre',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      },
                      {id: 38,name: '操作教程', path: '/my/myindex/operationtutorials',
                          child:[
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                              {id: 11,name: '系统通知', path: '/my/myindex/'},
                          ]
                      }
                  ]
              }
          ],
      }
   },
    created () {
      console.log(this.path())
    },
    methods: {
        path () {
            if(this.$route.path==='/my/myindex/pointlist'){
                return true
            }
        },
    }
}
</script>

<style lang="less" scoped>
  @import "../../../style/style.less";
  .my-index {
    padding: 30px 0;
    .left-box {
      width: 180px;
      border: 1px solid @border-color;
      background-color: #fafafa;
      float: left;
      margin-right: 20px;
    }
    .center-box {
      float: left;
      width: 700px;
      margin-right: 20px;
      background-color: #fff;
      min-height: 100px;
    }
    .right-box {
      float: left;
      width: 260px;
      >.guan{
        width: 260px;
        height: 154px;
        background: url("../../../assets/huanguan.png");
        margin-bottom: 15px;
        text-align: center;
        padding-top: 63px;
        >span{
          background-color: #f7bf0d;
          border-radius: 4px;
          color: white;
          padding: 2px 8px;
          font-size: 14px;
        }
        p{
          padding-top:10px;
          color: #fec32b;
          font-size: 14px;
          b{
            font-size: 20px;
          }
          span{
            color: @theme-color-dark;
          }
        }
        >:last-child{
          padding-top:1px;
        }
      }
      >.jifen{
        background-color: @theme-color-dark;
        border-radius: 4px;
        border: solid 2px  @theme-color-dark;
        width: 260px;
        height: 97px;
        margin-bottom: 10px;
        .jifen-top{
          background-color: white;
          height: 48px;
          text-align: center;
          line-height: 48px;
          p{
            font-size: 18px;
            color: #666666;
            span{
              color: @theme-color-dark;
            }
          }
        }
        .jifen-button{
          color: white;
          line-height: 45px;
          text-align: center;
          font-size: 22px;
        }
      }
      >.renwu{
        width: 260px;
        /*height: 306px;*/
        background-color: #ffffff;
        border: solid 1px #ff5371;
        margin-bottom: 10px;
        >p{
          color: @theme-color-dark;
          font-size: 16px;
          text-align: center;
          padding: 10px 0;
          border-bottom: 1px dashed @theme-color-dark;
        }
        >span{
          color: @theme-color-dark;
          font-size: 12px;
          display: block;
          text-align: right;
          line-height:36px;
          padding-right: 10px;
        }
        >ul{
          padding-top: 15px;
          border-bottom: 1px dashed @theme-color-dark;
          li{
            font-size: 16px;
            color: #999999;
            padding-left: 13px;
            padding-right: 5px;
            >:first-child{
              float: left;
              display: block;
              width: 155px;
            }
            >:last-child{
              float: right;
              font-size: 12px;
              padding-top: 3px;
              b{
                color: @theme-color-dark;
              }
            }
            img{
              width: 24px;
              height: 24px;
            }
          }
        }
      }
    }
  }
</style>
